﻿'Settings Form
'TODO: Add Error Trapping
Public Class frmScreenSettings
    'Sub to Save changes
    Private Sub Mds_perpetual_salaah_timesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mds_perpetual_salaah_timesBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.Mds_perpetual_salaah_timesBindingSource.EndEdit()
        Me.Mds_hadithBindingSource.EndEdit()
        Me.Mds_settingsBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.MDSDataSet_ForSettingsSection)
        UpdateSettings()
    End Sub
    'Sub when form is loading for the first time
    Private Sub frmScreenSettings_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'MDSDataSet_ForSettingsSection.mds_settings' table. You can move, or remove it, as needed.
        Me.Mds_settingsTableAdapter.Fill(Me.MDSDataSet_ForSettingsSection.mds_settings)
        'TODO: This line of code loads data into the 'MDSDataSet_ForSettingsSection.mds_hadith' table. You can move, or remove it, as needed.
        Me.Mds_hadithTableAdapter.Fill(Me.MDSDataSet_ForSettingsSection.mds_hadith)
        'TODO: This line of code loads data into the 'MDSDataSet_ForSettingsSection.mds_perpetual_salaah_times' table. You can move, or remove it, as needed.
        Me.Mds_perpetual_salaah_timesTableAdapter.Fill(Me.MDSDataSet_ForSettingsSection.mds_perpetual_salaah_times)

        If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
            lblAppVer.Text = lblAppVer.Text & My.Application.Deployment.CurrentVersion.ToString  'Application.ProductVersion
        Else
            lblAppVer.Text = lblAppVer.Text & "2 B Deployed!"
        End If

    End Sub
    'Exit the settings section
    Private Sub Mds_perpetual_salaah_timesBindingNavigatorExitItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mds_perpetual_salaah_timesBindingNavigatorExitItem.Click
        Me.Hide()
    End Sub

End Class
